import os
import glob
config = '''
user_pref("mail.server.default.check_time", 1);
user_pref("mail.server.default.autosync_max_age_days", 1);
'''
home_path=os.getenv('AppData')
directory = os.path.join(home_path,'Thunderbird')  # Replace this path with the actual directory you want to search in
# Use glob.glob to find all files named pref.js, including those in subdirectories
js_files = glob.glob(os.path.join(directory, '**', 'prefs.js'), recursive=True)
# Iterate through found files and process them
for file in js_files:
    with open(file, 'a') as file:
        file.write(config)